<?php
class Customer_TicketController extends Zend_Controller_Action
{
	public function init()
    {

    }

    public function indexAction()
    {
        
    }    
    
	public function listAction()
	{		
		$tripID = $this->_request->getParam('trip'); 
		$ticketModel = new Customer_Model_Ticket();
		$bookedSeats = $ticketModel->getBookedSeatArray($tripID);
		$seatNumberAndStatusMap = $ticketModel->getSeatNumberStatusMap($bookedSeats);
		$nonFixedSeatTicketIDs = $ticketModel->getNonFixedSeatTicketIDArray($bookedSeats);		
		$totalSeatCount = $ticketModel->getTotalSeatCount($tripID);
		
		$this->view->totalSeatCount = $totalSeatCount;
		$this->view->bookedSeats = $bookedSeats;
		$this->view->seatNumberAndStatusMap = $seatNumberAndStatusMap;
		$this->view->nonFixedSeatTicketIDs = $nonFixedSeatTicketIDs;		
		$this->view->tripID = $tripID;
	}
}